# -*- coding: utf-8 -*-
# @author: chenhuachao
# @time: 2018/6/27

from django.contrib import admin
from django.urls import path,include
from . import views
urlpatterns = [
    path('index/<int:resourcetype>/', views.index,name='资源创建主页'),
    path('search/', views.searchindex,name='资源搜索主页'),
    path('ftpsearch/', views.searchftp,name='ftp资源搜索主页'),
    path('get_resource/', views.get_resource,name='点击目录获取资源'),
    path('search_ftpresouce/', views.search_ftpresouce,name='ftp搜索获取资源'),
    path('desc/<int:resource_id>.html/', views.resourcedesc,name='资源详情页'),
    path('info/<int:resource_id>/', views.resourceinfo,name='资源详情api'),
    path('ftpresource/<int:resource_id>/', views.ftpresourceinfo,name='ftp资源详情api'),
    path('list/', views.resourcelist,name='资源列表操作'),
    path('ftplist/', views.ftpresourcelist,name='ftp资源列表操作'),
    path('file/list/', views.ftpresourcelist,name='ftp资源列表操作'),
    path('updatetable/', views.updatetable,name='更新表的描述信息'),
    path('gettableslist/<int:datasourceId>', views.gettableslist,name='获取数据库表结构和表描述信息'),
    path('gettableinfo/<str:tablename>/<int:db_id>', views.gettablesinfo,name='获取数据库表字段详细信息'),
    path('api/<int:resource_id>/', views.resourceapihandle,name='数据资源的api接口'),
    path('api/<int:resource_id>/download/', views.resourcedownload,name='数据资源下载接口'),
    path('api/<int:resource_id>/ftprs/download/', views.ftpresourcedownload,name='ftp数据资源下载接口'),
    path('user/appkey/', views.appkey,name='获取用户appkey'),
    path('upload/file/', views.uploadfile,name='上传ftp文件'),


    #test
    # path('test/', views.testupload,name='test'),
    # path('test1/', views.testone,name='test'),
    # path('files/upload/', views.fileupload,name='图片分片上传'),
    # path('upload/complete/', views.fileMerge,name='上传成功合并'),
]

handler404 = 'ziyuanguanli.views.page_not_found'